<div class="content">
    <div class="panel panel-default panel-intro">
        <div class="panel-body">
            <div id="" class="tab-content">
                <div class="tab-pane fade active in" id="one">
                    <div class="widget-body no-padding">
                        <div class="bootstrap-table">
                            <div class="fixed-table-toolbar">
                                <div class="bs-bars pull-left">

                                </div>
                                    <table id="" class="table table-striped table-bordered table-hover table-nowrap" data-operate-edit="1" data-operate-del="1" width="100%">
                                        <thead>

                                        <tr>
                                            <th style="text-align: center; vertical-align: middle;width:4.5%;" data-field="fid">
                                                产品ID
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:4.5%;" data-field="fid">
                                                <div class="th-inner "></div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:30%;" data-field="fid">
                                                <div class="th-inner ">产品名称/套餐名称</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width: 20%;" data-field="operate">
                                                <div class="th-inner ">选择类型</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle;width:30%;" data-field="fid">
                                                <div class="th-inner ">操作</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                        </tr>
                                        </thead>
                                        <tbody data-listidx="0">
                                        {volist name="package_list" id="package"}
                                        <tr data-index="0">
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {$package.pro_id}
                                            </td>

                                            <td style="text-align: center; vertical-align: middle; ">

                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">
                                                {$package.s_name}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle; ">

                                            </td>
                                            <td class="bs-checkbox "></td>
                                        </tr>
                                                {volist name="$package['list']" id="vlist"}
                                                    <tr data-index="0">
                                                        <td class="bs-checkbox "></td>
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            {$vlist.id}
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            {$vlist.ptitle}
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            {if condition="$vlist.selecttype eq 1"}
                                                                多选
                                                            {else}
                                                                单选
                                                            {/if}
                                                        </td>
                                                        <td style="text-align: center; vertical-align: middle; ">
                                                            <a href="javascript:;" class="btn btn-success btn-add " title="添加" onclick="zyx_add('{$id}','{$vlist.p_id}','{$vlist.id}');">
                                                                <i class="fa fa-plus"></i>
                                                                添加
                                                            </a>
                                                        </td>
                                                    </tr>
                                                {/volist}
                                        {/volist}
                                        </tbody>
                                    </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>

    function zyx_add(id,pid,package_id){
       /* alert(id);
        alert(pid);
        alert(package_id);*/
       //return ;
        $.ajax({
            type:'post',
            dataType:'json',
            url:'/admin/product/chargeable_zyx_list_add',
            data:{"id":id,"pid":pid,"package_id":package_id},
            success:function(data){
                if(data.status==1){
                    window.parent.location.reload();
                }else{
                    alert(data.message);
                }
            }
        })
    }



</script>